<template>
  <div class="app-container">
    <aisopchat :sop_name="sopName" />
  </div>
</template>

<script>
import aisopchat from './elements/aisopchat'

export default {
  name: 'DynamicSOP',
  components: {
    aisopchat
  },
  computed: {
    sopName() {
      // 从路由参数或查询参数中获取SOP名称
      return this.$route.query.sop_name || this.$route.params.sop_name || '默认'
    }
  },
  created() {
    console.log('Dynamic SOP created for:', this.sopName)
  }
}
</script>

<style scoped>
.app-container {
  padding: 20px;
}
</style>
